package com.zhuoyian.zyalibrary.service;

import java.util.ArrayList;
import java.util.List;

import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;

import android.content.Context;
import android.os.Handler;

import com.zhuoyian.zyalibrary.util.AppInfoUtil;

public class VersionsService extends BaseService {

	public VersionsService(Context context) {
		super(context);
	}

	public void GetNewVersions(Handler handler, String PBindKey, String PackId) {
		List<NameValuePair> params = new ArrayList<NameValuePair>();
		params.add(new BasicNameValuePair("PBindKey", PBindKey));
		params.add(new BasicNameValuePair("VCode", ""
				+ AppInfoUtil.getVersionCode(context)));
		params.add(new BasicNameValuePair("PackId", PackId));
		ServiceTask.addTask(GetAPIUrl("GetNewVersion"), params, handler);
	}
}
